{extend name="base" /}
{block name="body"}
<div class="layui-card">
	<div class="layui-card-body">
        <div class="layui-btn-group">
		    <a href="{:url('admin/forum/addplate')}" class="layui-btn"><i class="fa fa-plus-circle"></i> 添加板块</a>
        </div>
		<table class="layui-table layui-form plate">
			<thead>
			<tr>
				<th width="50">ID</th>
				<th >板块名称</th>
				<th width="90">图标</th>
				<th width="90">显示</th>
				<th width="90">排序</th>
				<th width="150">操作</th>
			</tr>
			</thead>
			<tbody>
			{foreach name="list" item="v" empty="$empty"}
			<tr>
				<td>{$v.id}</td>
				<td>{$v.name}</td>
				<td><img src="{$v.img}"></td>
				<td>
					<input type="checkbox" name="isshow" lay-skin="switch" lay-filter="*" lay-text="是|否" data-url="{:url('admin/forum/editplate', ['id' => $v.id])}" {if $v.isshow eq 1}checked="checked" {/if}>
				</td>
				<td>
					<input type="text" name="sort_order" value="{$v.sort_order}" autocomplete="off" class="layui-input ajax-update" data-url="{:url('admin/forum/editplate', ['id' => $v.id])}">
				</td>
				<td>
					<a href="{:url('admin/forum/editplate', ['id' => $v.id])}" class="layui-btn layui-btn-xs layui-btn-normal"><i class="fa fa-edit"></i> 编辑</a>
					<a href="{:url('admin/forum/delplate', ['id' => $v.id])}" class="layui-btn layui-btn-xs layui-btn-danger ajax-delete"><i class="fa fa-trash-o"></i> 删除</a>
				</td>
			</tr>
			{/foreach}
			</tbody>
		</table>
	</div>
</div>
{/block}
